.view-calendar {
    --view-calendar-row-height: 1fr;
    --view-calendar-border-color: var(--el-border-color-light);
    --view-calendar-item-border-color: var(--el-color-white);
    --view-calendar-item-border-action-color: var(--el-color-primary);
    --view-calendar-border-radius: 4px;
    --view-calendar-border-width: 2px;
    --view-calendar-line-color: #ebeef5;
    --view-calendar-badge-width: 30%;
    --view-calendar-badge-min-width: 40px;
    --view-calendar-badge-height: 24px;
    // 节日
    --view-calendar-holidays-bgc: var(--el-color-danger-light-9);
    --view-calendar-holidays-color: var(--el-color-danger-light-3);
    --view-calendar-holidays-border-color: var(--el-color-danger);
    // 调休
    --view-calendar-works-bgc: var(--el-color-primary-light-9);
    --view-calendar-works-color: var(--el-color-primary-light-3);
    --view-calendar-works-border-color: var(--el-color-primary);

    border: 1px solid var(--view-calendar-border-color);
    border-radius: var(--view-calendar-border-radius);

    &-header {
        border-bottom: 1px solid var(--view-calendar-border-color);

        &__left,
        &__right {
            color: var(--el-text-color-primary);
        }

        &__left {
            gap: 5px;

            .el-date-editor {
                position: absolute;
                opacity: 0;
                z-index: 9;

            }

            .el-input__wrapper,
            input {
                cursor: pointer !important;
            }

            .el-icon {
                // color: var(--el-color-black);
                position: relative;
                z-index: 2;
                color: var(--el-color-primary);

                &::after {
                    position: absolute;
                    z-index: -1;
                    content: '';
                    width: 160%;
                    height: 160%;
                    border-radius: 50%;
                    background-color: rgb(230, 247, 255);
                }
            }
        }

        &__time {
            color: var(--el-color-black);
        }

        &__week {
            padding-top: 4px;
            color: var(--el-text-color-placeholder);
        }
    }

    &-body {

        &__day {

            @include roll();
            grid-template-rows: repeat(6, var(--view-calendar-row-height));
        }

        &__week {
            position: relative;

            display: flex;
            width: 100%;
            height: 42px;
            padding: 0;
            box-sizing: border-box;

            li {
                position: relative;
                display: flex;
                align-items: center;
                justify-content: center;

                flex: 1;
                font-size: 0.95rem;
            }

            li:last-of-type,
            li:first-of-type {
                color: var(--view-calendar-holidays-border-color);
            }
        }

        &__row {
            position: relative;
            width: 100%;
            min-height: 60px;
            display: flex;
            flex: 1;
            z-index: 10;
            border-bottom: 1px solid var(--view-calendar-line-color);
        }

        &__row:first-child {
            border-top: 1px solid var(--view-calendar-line-color);
        }

        &__col {
            position: relative;
            box-sizing: border-box;
            flex: 1;
            border-left: 1px solid var(--view-calendar-line-color);
            padding: 2px;
            font-size: 16px;
            transition: all 0.2s;
        }

        &__col:last-child {
            border-right: 1px solid var(--view-calendar-line-color);
        }

        &__mark {
            position: absolute;
            top: 0px;
            left: 0px;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
            box-sizing: border-box;

            font-size: 20rem;
            color: #ebeef5;
            opacity: 0.5;

            z-index: 0;
        }
    }

    &-item {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        box-sizing: border-box;
        border-radius: 6px;
        border: var(--view-calendar-border-width) solid var(--view-calendar-item-border-color);
        transition: all 0.2s;

        &:hover {
            cursor: pointer;
            // border: 2px solid ;
            border-color: var(--view-calendar-item-border-action-color);
        }

        .view-calendar-item__title {
            font-size: 1.2rem;
            color: #999999;
        }

        &__lunar {
            margin-top: 6px;
            font-size: 0.85rem;
            color: #bcbcbc;
        }
    }

    &-item::before {
        display: none;
        padding: 2px 4px;
        position: absolute;
        top: calc(0px - var(--view-calendar-border-width));
        right: calc(0px - var(--view-calendar-border-width));
        height: var(--view-calendar-badge-height);
        width: var(--view-calendar-badge-width);
        min-width: var(--view-calendar-badge-min-width);
        font-size: 14px;
        // border-radius: var(--view-calendar-border-radius);
        border-bottom-left-radius: var(--view-calendar-border-radius);
        box-sizing: border-box;
        border: var(--view-calendar-border-width) solid var(--view-calendar-item-border-color);
        border-top-width: 0px;
        border-right-width: 0px;
        background-color: var(--el-bg-color);
        border-left-color: inherit;
        border-bottom-color: inherit;
        content: '';
    }

    &-item::after {
        display: none;
        position: absolute;
        top: calc(0px - var(--view-calendar-border-width));
        right: calc(0px - var(--view-calendar-border-width));

        font-size: 14px;
        border-radius: var(--view-calendar-border-radius);
        box-sizing: border-box;
        // background-color: inherit;
        background-color: var(--el-color-primary);
        color: var(--el-bg-color);
        text-align: center;
        content: attr(badge);
        height: calc(var(--view-calendar-badge-height) - var(--view-calendar-border-width) * 2);
        line-height: calc(var(--view-calendar-badge-height) - var(--view-calendar-border-width) * 2);
        width: calc(var(--view-calendar-badge-width) - var(--view-calendar-border-width) * 2);
        min-width: calc(var(--view-calendar-badge-min-width) - var(--view-calendar-border-width) * 2);
        box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
    }

    &-item.badge::before,
    &-item.badge::after {
        display: block;
    }

    &-item.badge.is-works::after,
    &-item.badge.is-holidays::after {
        background-color: inherit;
    }

    &-item.is-holidays,
    &-item.is-works {
        background-color: var(--view-calendar-holidays-bgc);

        .view-calendar-item__text {
            position: absolute;
            top: 6px;
            left: 14px;
            font-size: 0.85rem;
            color: var(--view-calendar-holidays-color);
        }

        &::after {
            color: var(--view-calendar-holidays-color);
        }

        .view-calendar-item__title {
            color: var(--view-calendar-holidays-color);
        }

    }

    &-item.is-works {
        background-color: var(--el-color-primary-light-9);

        [class].view-calendar-item__text {
            color: var(--el-color-primary-light-3);
        }

        &::after {
            color: var(--el-color-primary-light-3);
        }

        [class].view-calendar-item__title {
            color: var(--el-color-primary-light-3);
        }
    }

    &-item.is-selected {
        // border: 2px solid var(--view-calendar-item-border-action-color);
        border-color: var(--view-calendar-item-border-action-color);
    }

    &-item.is-holidays.is-selected {
        // border: 2px solid var(--view-calendar-holidays-color);
        border-color: var(--view-calendar-holidays-color);
    }

    &-item.is-selected.is-current-month {
        // border: 2px solid var(--view-calendar-item-border-action-color);
        border-color: var(--view-calendar-item-border-action-color);
    }

    &-item.is-holidays.is-selected.is-current-month {
        // border: 2px solid var(--view-calendar-holidays-border-color);
        border-color: var(--view-calendar-holidays-border-color);
    }

    &-item.is-week {
        .view-calendar-item__title {
            color: var(--view-calendar-holidays-color);
        }
    }

    &-item.is-current {
        .view-calendar-item__title {
            color: #333333;
        }

        .view-calendar-item__lunar {
            color: #666666;
        }
    }

    &-item.is-current.is-holidays {
        background-color: #fbe3e4;

        .view-calendar-item__text {
            position: absolute;
            top: 6px;
            left: 14px;
            font-size: 0.85rem;
            color: var(--view-calendar-holidays-border-color);
        }

        &::after {
            color: var(--view-calendar-holidays-border-color);
        }
    }

    &-item.is-current.is-holidays,
    &-item.is-current.is-week {
        .view-calendar-item__title {
            color: var(--view-calendar-holidays-border-color);
        }
    }

    &-item.is-current.is-week.is-works {
        .view-calendar-item__text {
            color: var(--view-calendar-works-border-color);
        }

        &::after {
            color: var(--view-calendar-works-border-color);
        }

        .view-calendar-item__title {
            color: var(--view-calendar-works-border-color);
        }
    }

    &-item.is-current.is-holidays {
        background-color: rgba(255, 228, 231, 0.8);

        .view-calendar-item__text {
            position: absolute;
            top: 6px;
            left: 14px;
            font-size: 0.85rem;
            color: var(--view-calendar-holidays-border-color);
        }

        &::after {
            color: var(--view-calendar-holidays-border-color);
        }

        .view-calendar-item__title {
            color: var(--view-calendar-holidays-border-color);
        }
    }

    &-item.is-holidays:hover {
        // border: 2px solid var(--view-calendar-holidays-border-color);
        border-color: var(--view-calendar-holidays-border-color);
    }
}

.view-calendar.span {
    [class].view-calendar-body__span {
        --item-height: 80px;
        --item-title-height: 30px;
        --item-size: 14px;
        --item-radius: 4px;
        --item-gap: 4px;
        font-size: var(--item-size);
        font-family: 'Courier New', Courier, monospace;
        pointer-events: none;
        z-index: 99;
        color: var(--el-bg-color);
        // max-height: 40vh;
        display: grid;
        grid-template-columns: repeat(7, 1fr);

        &>div {
            height: var(--item-height);

            p {
                display: block;
                height: var(--item-title-height);
                line-height: var(--item-title-height);
                margin: 0px;
                background-color: var(--el-color-primary);

            }

            p.first {
                padding-left: 8px;
                border-top-left-radius: var(--item-radius);
                border-bottom-left-radius: var(--item-radius);
            }

            p.last {
                // @extend .text-overflow-hide;
                overflow: hidden;
                /* 文本不会换行 */
                white-space: nowrap;
                /* 显示省略符号来代表被修剪的文本 */
                text-overflow: ellipsis;
                padding-right: 8px;
                border-top-right-radius: var(--item-radius);
                border-bottom-right-radius: var(--item-radius);
            }

            p.first.last {
                // @extend .text-overflow-hide;
                overflow: hidden;
                /* 文本不会换行 */
                white-space: nowrap;
                /* 显示省略符号来代表被修剪的文本 */
                text-overflow: ellipsis;
            }
        }

        &>div:not(.seat) {
            pointer-events: all;
            gap: var(--item-gap);
            padding-top: 3px;
            background-color: #fff;
        }



    }


}